/*
 * @(#)Request.java
 *
 *
 *
 * ver 1.0 Aug 30, 2007 ggranum
 */
package org.testfire.agent.httpserver;

import java.util.Collections;
import java.util.HashMap;
import java.util.Map;

public class Request
{

    private String method = "";
    private String url;
    private Map<String, String> headers = new HashMap<String, String>( );
    private Map<String, String> urlParams = new HashMap<String, String>( );
    private Map<String, String> parameters = new HashMap<String, String>( );

    public Request( String method, String url, Map<String, String> urlParameters,
        Map<String, String> headers,
        Map<String, String> parameters )
    {
        this.headers = Collections.unmodifiableMap( headers );
        this.method = method;
        this.parameters = Collections.unmodifiableMap(parameters);
        this.url = url;
    }

    public Map<String, String> getHeaders()
    {
        return headers;
    }

    public String getMethod()
    {
        return method;
    }

    public Map<String, String> getParameters()
    {
        return parameters;
    }

    public String getUrl()
    {
        return url;
    }

    public Map<String, String> getUrlParams()
    {
        return urlParams;
    }

    public String getHeader( String key ) {return headers.get( key );}
    public String getParameter( String key ) {return parameters.get( key );}
    public String getUrlParameter( String key ) {return urlParams.get( key );}
}

// eof: Request.java